Automatic 1

您所在的位置:网站首页 sure 1 sec plz Automatic 1

Automatic 1

#Automatic 1| 来源: 网络整理| 查看: 265

Open Live Script

This example shows how to apply three different denoising techniques to a noisy signal. It compares the results with plots and the threshold values produced by each technique.

First, to ensure reproducibility of results, set a seed that will be used to generate the random noise.

rng('default')

Create a signal consisting of a 2 Hz sine wave with transients at 0.3 and 0.72 seconds. Add randomly generated noise to the signal and plot the result.

N = 1000; t = linspace(0,1,N); x = 4*sin(4*pi*t); x = x - sign(t-0.3) - sign(0.72-t); sig = x + 0.5*randn(size(t)); plot(t,sig) title('Signal') grid on

Using the sym8 wavelet, perform a level 5 wavelet decomposition of the signal and denoise it by applying three different threshold selection rules to the wavelet coefficients: SURE, minimax, and Donoho and Johnstone's universal threshold with level-dependent estimation of the noise. In each case, apply hard thresholding.

lev = 5; wname = 'sym8'; [dnsig1,c1,l1,threshold_SURE] = wden(sig,'rigrsure','h','mln',lev,wname); [dnsig2,c2,l2,threshold_Minimax] = wden(sig,'minimaxi','h','mln',lev,wname); [dnsig3,c3,l3,threshold_DJ] = wden(sig,'sqtwolog','h','mln',lev,wname);

Plot and compare the three denoised signals.

subplot(3,1,1) plot(t,dnsig1) title('Denoised Signal - SURE') grid on subplot(3,1,2) plot(t,dnsig2) title('Denoised Signal - Minimax') grid on subplot(3,1,3) plot(t,dnsig3) title('Denoised Signal - Donoho-Johnstone') grid on

Compare the thresholds applied at each detail level for the three denoising methods.

threshold_SUREthreshold_SURE = 1×5 0.9592 0.6114 1.4734 0.7628 0.4360 threshold_Minimaxthreshold_Minimax = 1×5 1.1047 1.0375 1.3229 1.1245 1.0483 threshold_DJthreshold_DJ = 1×5 1.8466 1.7344 2.2114 1.8798 1.7524


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3